import request from "@/utils/request";

// 查询专业列表
export function listJuanMajor(query) {
  return request({
    url: "/system/juanMajor/list",
    method: "get",
    params: query,
  });
}

// 查询专业详细
export function getJuanMajor(majorId) {
  return request({
    url: "/system/juanMajor/" + majorId,
    method: "get",
  });
}

// 新增专业
export function addJuanMajor(data) {
  return request({
    url: "/system/juanMajor",
    method: "post",
    data: data,
  });
}

// 修改专业
export function updateJuanMajor(data) {
  return request({
    url: "/system/juanMajor",
    method: "put",
    data: data,
  });
}

// 删除专业
export function delJuanMajor(majorId) {
  return request({
    url: "/system/juanMajor/" + majorId,
    method: "delete",
  });
}

// 根据院系id获取专业列表
export function getMajorBydepartmentId(query) {
  return request({
    url: "/system/juanMajor/getMajorBydepartmentId",
    method: "get",
    params: query,
  });
}



// 查询左侧树结构
export function leftTree() {
  return request({
    url: "/system/juanMajor/getDepartTree",
    method: "get",
  });
}
